package com.bawei.controller;

import com.bawei.entity.User;
import com.bawei.service.AreaService;
import com.bawei.service.UserService;
import com.bawei.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/area/")
public class AreaController {
    @Autowired
    private AreaService areaService;


    /*地区查询*/
    @RequestMapping("list")
    public ResultEntity arealist(){
        return ResultEntity.ok(areaService.getAreaList());
    }

    @RequestMapping("listByPid")
    public ResultEntity listByPid(){
        return ResultEntity.ok(areaService.getAreaListByPid()) ;
    }
}
